Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Only register inequality comparisons for orderable types #11784

Closed

Conversation

kevinwilfong
Copy link
Contributor

Summary:
Inequalities only work with types that are orderable pretty much by definition.

For maps in particular we allow users to call map1 < map2 but it will always throw because the map
type does not support inequalities unless null is treated as a value (which it is not in GenericView's
compare function which is what gets invoked).

This will address #11549 where inequalities on
maps can be generated in fuzzers and result in exceptions.

Differential Revision: D66909744

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 7, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D66909744

Copy link

netlify bot commented Dec 7, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit cf02306
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67572f3228dd4a000886927a

@kevinwilfong
Copy link
Contributor Author

kevinwilfong commented Dec 7, 2024

According to the original PR that added these it was intended to add support for arrays and rows (maps weren't mentioned) so this seems in line with that.

#11241

…okincubator#11784)

Summary:

Inequalities only work with types that are orderable pretty much by definition.

For maps in particular we allow users to call map1 < map2 but it will always throw because the map
type does not support inequalities unless null is treated as a value (which it is not in GenericView's
compare function which is what gets invoked).

This will address facebookincubator#11549 where inequalities on
maps can be generated in fuzzers and result in exceptions.

Reviewed By: xiaoxmeng

Differential Revision: D66909744
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D66909744

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 5739a6d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants